www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\admin\adminModelComponentLabel\D_chk2_add_custom_dyn_content_lable.asp
<% '************************************************************** ' 新动软网站管理系统 ' 官方网站: http://www.aspcpu.com ' 系统作者: 阮丁远(网名:天下程序) ' Copyright 新动软网站管理系统 版权所有 '************************************************************** %> <htmL> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <LINK href="../css.css" type=text/css rel=stylesheet> <% dir_set="../../" %> <!--#include file=../../inc/conn.asp--> <!--#include file=../../inc/Functionb.asp--> <!--#include file=../../inc/ajaxLIB.asp--> <!--#include file=../inc/checkadmin2.asp--> <!--#include file=../../inc/functionFiless.asp--> <!--#include file=../../inc/ND_class_function.asp--> <!--#include file=conn_m.asp--> <% AJAXshowLoader() %> <% session("newdsoft_selct_a_lable_bef_haved")="" if find_dataw("qitashezhi123","0",7)<>"1" and qx_if_max=0 then response.redirect "../D_suodinguser.asp" end if %> <% set filea=new Cls_FSO fpath=request("fpath") '========================================================== ztypee=request("labeltype") if ztypee<>"" then fph=request("fpath") sss1=loadfile("../../Model/ComponentLabels/"&fph&"index_componentlabel.asp") if instr(1,sss1,"$componentlabelname:",1)<>0 then nd1_m_label_name=trim(mid(sss1,instr(1,sss1,"$componentlabelname:",1)+20,instr(1,sss1,"$end_componentlabelname",1)-(instr(1,sss1,"$componentlabelname:",1)+20))) else nd1_m_label_name="" end if if instr(1,sss1,"$componentlabelcixu:",1)<>0 then nd1_m_label_cixu=trim(mid(sss1,instr(1,sss1,"$componentlabelcixu:",1)+20,instr(1,sss1,"$end_componentlabelcixu",1)-(instr(1,sss1,"$componentlabelcixu:",1)+20))) else nd1_m_label_cixu="" end if if instr(1,sss1,"$is_sys_componentlabel:",1)<>0 then nd1_m_label_is_sys=trim(mid(sss1,instr(1,sss1,"$is_sys_componentlabel:",1)+23,instr(1,sss1,"$end_is_sys_componentlabel",1)-(instr(1,sss1,"$is_sys_componentlabel:",1)+23))) else nd1_m_label_is_sys="" end if if ztypee="addmode" then hzzza="addmode" filezza="addmode_label.asp" end if if ztypee="editmode" then hzzza="editmode" filezza="editmode_label.asp" end if if ztypee="showmode" then hzzza="showmode" filezza="showmode_label.asp" end if if ztypee="do_add_mode" then hzzza="doaddmode" filezza="do_add_mode_label.asp" end if if ztypee="do_edit_mode" then hzzza="doeditmode" filezza="do_edit_mode_label.asp" end if end if '======================================================== if ztypee<>"" then bname="$"&hzzza&"$-ComponentLabel-$" bname3=filezza else bname=trim(request("bnm")) bname3=bname&".asp" end if cont=request("Content") bname_err=0 if bname="" then bname_err=1 end if Dim regEx Set regEx = New RegExp ' 建立正则表达式。 regEx.Pattern = "^[A-Za-z0-9_]+$" ' 设置模式。 regEx.IgnoreCase = False ' 设置是否区分大小写。 retVal = regEx.Test(bname) ' 执行搜索测试。 If retVal<>true and ztypee="" Then bname_err=1 End If if bname_err=1 then %> <script language=javascript> alert("标签名为空 或者 不是字母+数字及_号的组合"); history.go(-1); </script> <% response.end else bname1=bname params_str="" for iit=1 to cint(request("params_len")) if trim(request("c"&cstr(iit)))<>"" then sss1=replace(replace(trim(request("c"&cstr(iit))),",",""),"|","") sss1=replace(replace(sss1,chr(34),"”"),"'","‘") sss2=replace(replace(trim(request("s"&cstr(iit))),",", "," ),"|","") sss2=replace(replace(sss2,chr(34),"”"),"'","‘") params_str=params_str&sss1&","&sss2&"|" end if next if params_str<>"" then params_str=left(params_str,len(params_str)-1) end if par=split(params_str,"|") '----h2--------- yooo=0 yooo2=0 for iiii=0 to ubound(par) sss33=split(par(iiii),",") sss3=sss33(0) for iiiii=0 to ubound(par) sss44=split(par(iiiii),",") sss4=sss44(0) if sss3=sss4 and cint(iiiii)<>cint(iiii) then yooo=1 yooo2=1 end if next next errhhhtd=0 '----end h2--------- if yooo=1 then '----h3--------- if yooo2=1 then %> <script language=javascript> alert("发现参数列表中有同名参数,必须每个参数都不同名字!"); history.go(-1); </script> <% response.end end if if errhhhtd=1 then %> <script language=javascript> alert("发现 本标签生成html静态页时的选项2 里填写的某个项的 开始asp代码的自定义开始标记 或 结束asp代码的自定义结束标记 里含以下的一个或多个不允许出现的字符:\n\n \" \' \, \: \| "); history.go(-1); </script> <% response.end end if '----end h3--------- else sql=replace_asp(request("sqlms")) lbsm=replace_asp(trim(request("lbsm"))) if request("eemode")="1" then Content111=request("Contentt") else Content111=request("Content") end if if trim(sql)="" then %> <script language=javascript> alert("查询sql语句 不能为空!"); history.go(-1); </script> <% else rscname=trim(replace_asp(request("rsname"))) if trim(rscname)="" then rscname="rs_x" 'asc(60)=<,asc(37)=%,chr(13)=enter,chr(62)=> ext1=chr(60)&chr(37)&"'$start_ext_newDsoft 以下系统生成,勿删!"&vbcrlf&"'$newDsoft_label_type$:"&"dyn_content_label"&"$end_newDsoft_label_type$"&vbcrlf ext1=ext1&"'$newDsoft_label_name$:"&bname1&"$end_newDsoft_label_name$"&vbcrlf ext1=ext1&"'$newDsoft_label_sql$:"&sql&"$end_newDsoft_label_sql$"&vbcrlf ext1=ext1&"'$newDsoft_label_params$:"¶ms_str&"$end_newDsoft_label_params$"&vbcrlf ext1=ext1&"'$newDsoft_label_fenye_num$:"&" "&"$end_newDsoft_label_fenye_num$"&vbcrlf ext1=ext1&"'$newDsoft_label_beizhu$:"&lbsm&"$end_newDsoft_label_beizhu$"&vbcrlf ext1=ext1&"'$newDsoft_is_sys_label$:"&"0"&"$end_newDsoft_is_sys_label$"&vbcrlf ext1=ext1&"'$newDsoft_other_params$:"&"rsname:"&rscname&"|htmledxa:"&htmledxa&"|htmledxb:"&htmledxb&"$end_newDsoft_other_params$"&vbcrlf ext1=ext1&"'$end_ext_newDsoft"&chr(37)&chr(62) if filea.ReportFileStatus(server.mappath("../../Model/ComponentLabels/"&fpath&bname3))=1 then sssp=fpath sssspq=split(sssp,"/") ooosss="" for iii=0 to ubound(sssspq)-2 ooosss=ooosss&sssspq(iii)&"/" next %> <script language=javascript> alert("有重名标签文件存在!"); self.location="D_admin_custom_label.asp?fpath=<%=ooosss%>"; </script> <% else call createfile("../../Model/ComponentLabels/"&fpath&bname3,ext1&Content111,1) '--------------------------add1 cont11=loadfile("../../Model/ComponentLabels/"&fpath&bname3) call get_info_array_from_label_file_content(cont11) if ztypee<>"" then nd1_l_name=nd1_m_label_name&"$"&hzzza&"$" end if set rs4aa=server.CreateObject("adodb.recordset") rs4aa.open "select * from ND_label_cachem where lcase(label_name)='"&nd1_l_name&"'",conn2,1,1 set rs4=server.CreateObject("adodb.recordset") if not rs4aa.eof then rs4.open "select * from ND_label_cachem where lcase(label_name)='"&nd1_l_name&"'",conn2,1,3 else rs4.open "select * from ND_label_cachem",conn2,1,3 rs4.addnew end if rs4("label_code")=nd1_label_code rs4("label_name")=nd1_l_name rs4("label_full_path_name")=trim("Model/ComponentLabels/"&fpath&bname3) rs4("label_params")=nd1_label_params rs4("label_type")=nd1_label_type rs4("label_sql")=nd1_label_sql rs4("label_fenye_num")=nd1_label_fenye_num rs4("label_beizhu")=nd1_label_beizhu rs4("is_sys_label")="0" rs4("label_other_params")=nd1_other_params rs4.update rs4.close set rs4=nothing '--------------------------add1 sssp=fpath sssspq=split(sssp,"/") ooosss="" for iii=0 to ubound(sssspq)-2 ooosss=ooosss&sssspq(iii)&"/" next %> <script language=javascript> alert("添加成功!"); self.location="D_admin_custom_label.asp?fpath=<%=ooosss%>"; </script> <% end if end if end if end if %> <% AJAXcloseLoader() %> </html>